package com.sodaopen.study.mapper;

import org.apache.ibatis.annotations.Select;

import com.sodaopen.study.entity.Teacher;

public interface TeacherMapper {

	@Select("select t.*, (select count(*) from t_course where teacher_id=t.id) course_count from t_teacher t where id=#{id}")
	Teacher selectById(Integer id);

	@Select("select * from t_teacher where username=#{username}")
	Teacher selectByUsername(String username);

}
